<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="UTF-8">
		<title>登录</title>
		<link rel="stylesheet" href="css/index.css">
		<script src="js/vue.js"></script>
		<script src="js/axios.min.js"></script>
	</head>
	<body>
		<canvas class="cavs" width="1496" height="728"></canvas>

		<div id="abc" class="loginmain">
			<div class="login-title">
				<span>管理员登录</span>
			</div>

			<div class="login-con" method="post">
				<div class="login-user">
					<div class="icon">
						<img src="image/cd-icon-username.png" alt="">
					</div>
					<input type="text" name="gname" placeholder="用户名" autocomplete="off" v-model="gname">
				</div>
				<div class="login-pwd">
					<div class="icon">
						<img src="image/cd-icon-password.png" alt="">
					</div>
					<input type="password" name="gpwd" placeholder="密码" autocomplete="off" v-model="gpwd">
				</div>
				<div class="login-btn">
					<input type="submit" value="登录" @click="denglu">
				</div>
			</div>

		</div>



		<script>
			var a = new Vue({
				el: "#abc",
				data: {
					gname: "",
					gpwd: "",
				},
				created: function() {

				},
				methods: {
					denglu: function() {
						axios.get("login?gname=" + this.gname + "&gpwd=" + this.gpwd)
							.then((res) => {
								var j = res.data;
								alert(j);
								window.location.href="hmain.html";
							})
							.catch((Error) => {
								console.log(Error);
								alert("aaaa");
							})
					}
				}
			});
		</script>
		<script src="js/jquery-1.7.2.js"></script>
		<script src="js/ban.js"></script>
	</body>
</html>
